package com.jingdianjichi.user.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jingdianjichi.user.entity.po.UserPo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

@Mapper  // 添加此注解，确保 MyBatis 识别
@Repository
public interface UserMapper {

    @Insert("INSERT INTO afe_user (name, age) VALUES (#{name}, #{age})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insert(UserPo user);

}

